package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.wisdom.domain.FzServiceComplaint;
import com.ruoyi.wisdom.mapper.FzServiceComplaintMapper;
import com.ruoyi.wisdom.service.IFzServiceComplaintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 投诉信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-05
 */
@Service
public class FzServiceComplaintServiceImpl implements IFzServiceComplaintService
{
    @Autowired
    private FzServiceComplaintMapper fzServiceComplaintMapper;

    /**
     * 查询投诉信息
     * 
     * @param complaintId 投诉信息ID
     * @return 投诉信息
     */
    @Override
    public FzServiceComplaint selectFzServiceComplaintById(String complaintId)
    {
        return fzServiceComplaintMapper.selectFzServiceComplaintById(complaintId);
    }

    /**
     * 查询投诉信息列表
     * 
     * @param fzServiceComplaint 投诉信息
     * @return 投诉信息
     */
    @Override
    public List<FzServiceComplaint> selectFzServiceComplaintList(FzServiceComplaint fzServiceComplaint)
    {
        return fzServiceComplaintMapper.selectFzServiceComplaintList(fzServiceComplaint);
    }

    /**
     * 新增投诉信息
     * 
     * @param fzServiceComplaint 投诉信息
     * @return 结果
     */
    @Override
    public int insertFzServiceComplaint(FzServiceComplaint fzServiceComplaint)
    {
        fzServiceComplaint.setCreateTime(DateUtils.getNowDate());
        return fzServiceComplaintMapper.insertFzServiceComplaint(fzServiceComplaint);
    }

    /**
     * 修改投诉信息
     * 
     * @param fzServiceComplaint 投诉信息
     * @return 结果
     */
    @Override
    public int updateFzServiceComplaint(FzServiceComplaint fzServiceComplaint)
    {
        fzServiceComplaint.setUpdateTime(DateUtils.getNowDate());
        return fzServiceComplaintMapper.updateFzServiceComplaint(fzServiceComplaint);
    }

    /**
     * 删除投诉信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzServiceComplaintByIds(String ids)
    {
        return fzServiceComplaintMapper.deleteFzServiceComplaintByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除投诉信息信息
     * 
     * @param complaintId 投诉信息ID
     * @return 结果
     */
    @Override
    public int deleteFzServiceComplaintById(String complaintId)
    {
        return fzServiceComplaintMapper.deleteFzServiceComplaintById(complaintId);
    }
}
